<extend name="../layout" />

<block name="main_content">
    <include file="Common:SettingsHeader:member" />
    <div class="widget-box">
        <div class="widget-title"> <span class="icon"> <i class="icon-info-sign"></i> </span>
            <h5>{:L('group_list')}</h5>
            <a href="javascript:add();" class="label label-info">{:L('add_new')}</a>
        </div>
        <div class="widget-content nopadding">
            <table class="table table-bordered table-striped with-check">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>{:L('name')}</th>
                        <th>{:L('status')}</th>
                        <th>{:L('operation')}</th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="list" id="l">
                        <tr>
                            <td>{$l.id}</td>
                            <td>{$l.title}</td>
                            <td><span class="badge badge-{$l.status_class}">{:L($l[status_lang])}</span></td>
                            <td>
                                <a href="javascript:viewDetail({$l.id})" class="btn btn-primary btn-mini">{:L('view_detail')}</a>
                                <a href="javascript:edit({$l.id})" class="btn btn-primary btn-mini">{:L('edit')}</a>
                                <if condition="$l[status] eq 1">
                                     <a href="javascript:changeStatus({$l.id},0);" class="btn btn-mini btn-danger">{:L('disable')}</a>
                                <else />
                                     <a href="javascript:changeStatus({$l.id},1);" class="btn btn-mini btn-success">{:L('enable')}</a>
                                </if>
                                <a href="javascript:del({$l.id});" class="btn btn-mini btn-danger">{:L('delete')}</a>
                            </td>
                        </tr>
                    </volist>
                </tbody>
            </table>
        </div>
    </div>
</block>